Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

params,core: add max and target value to chain config #31002

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

lightclient
Copy link
Member

@lightclient lightclient commented Jan 7, 2025

Implements EIP-7840 and EIP-7691.

params/config.go Outdated Show resolved Hide resolved
Copy link

@Majid6561 Majid6561 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app

miner/worker.go Outdated Show resolved Hide resolved
miner/worker.go Outdated Show resolved Hide resolved
@lightclient
Copy link
Member Author

Made the updates from your review, Marius. Thanks!

@@ -26,7 +26,7 @@ import (
"github.com/holiman/uint256"
)

var rand = mrand.New(mrand.NewSource(1))
var rnd = mrand.New(mrand.NewSource(1))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed this because it was playing havoc with my LSP for some reason.

@lightclient lightclient force-pushed the eip-7840 branch 4 times, most recently from 5df556c to c3daabe Compare January 14, 2025 04:32
params/config.go Outdated
// requested time.
func (c *ChainConfig) TargetBlobsPerBlock(time uint64) uint64 {
if c.BlobScheduleConfig == nil {
panic("blob schedule not defined")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should try to remove these panics and put a check in the fork order checker.

params/config.go Outdated Show resolved Hide resolved

// CheckConfigBlobSchedule checks that all forks with blobs enabled explicitly
// define the blob schedule configuration.
func (c *ChainConfig) CheckConfigBlobSchedule() error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this not in CheckConfigForkOrder? If we introduce another function we have to call it everywhere. This check is also kind of related to the 'fork order', so it would fit perfectly into the other function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I can do this - just thought as I was originally writing it there that it is a different check than checking the fork order. So either needed to change that function's name or create a new one. Could also create a new function like CheckConfig() that calls all methods that verify the config, but does seem a bit overkill. I don't mind adding it back to CheckConfigForkOrder.

}

// CalcExcessBlobGas calculates the excess blob gas after applying the set of
// blobs on top of the excess blob gas.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to enhance the description by adding:

This function assumes that the provided parent header has already passed the London fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants